Auto merge of #3205 - matklad:fix-rustdoc-ld-path, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 17 Oct 2016 15:47:36 +0000 (08:47 -0700)
committerGitHub <noreply@github.com>
Mon, 17 Oct 2016 15:47:36 +0000 (08:47 -0700)
commit6acf50f2a423fad64002a67ff85b386a80aa7872
tree090ba53dff9e21e37c2cf8b24e4b42a16182e340
parenta8baa5b8f36e88170c8c56523b6eb72efc2cc55e
parent21cdb63962451b538c7483aeb9dff717523b0bce
Auto merge of #3205 - matklad:fix-rustdoc-ld-path, r=alexcrichton

Pass target environment for rustdoc

This should fix #3200, but I am not sure that this is a correct fix, and I need some input to figure this out.

`rustdoc` is invoked in two places, in `cargo_test.rs` and in `cargo_rustc/mod.rs`. Before the refactoring PR, these invocations used different LD_LIBRARY paths. [The one in cargo_rustc](https://github.com/rust-lang/cargo/pull/3198/files#diff-59acd1a3101aebbb591ac7ab51c19d9eR427) used "host" version, while [the one in cargo_test](https://github.com/rust-lang/cargo/blob/a8baa5b8f36e88170c8c56523b6eb72efc2cc55e/src/cargo/ops/cargo_test.rs#L131) used "target" version.

The original PR changed both to "host", this PR switches both to "target". Is this correct, or should we stick with different environments for building documentation and doctests?